<?php
/**
 * Created by PhpStorm.
 * Author: ls
 * Time: 2023/9/20 10:33
 * Desc: 订单
 */
class Request_Api_V2_Order extends Request_Api_V2_Base
{
    public function __construct($request_param)
    {
        parent::__construct($request_param);

        $this->validation->rule('mid', ['Rule_Member', 'need_member']);
    }

    public function list()
    {
        $this->rules = [
            ['page', ['not_empty', 'digit', $this->rule_min(1)]],
            ['pagesize', ['not_empty', 'digit', $this->rule_min(1)]],
            ['status', ['digit', $this->rule_min(0)]],
            ['type_id', ['digit', $this->rule_min(1)]],
        ];

        return $this;
    }

    public function detail()
    {
        $this->rules = [
            ['id', ['not_empty', 'digit', $this->rule_min(1)]],
        ];

        return $this;
    }

    public function get_traveller_list()
    {
        $this->rules = [
            ['id', ['not_empty', 'digit', $this->rule_min(1)]],
        ];

        return $this;
    }

    public function cancel_order()
    {
        $this->rules = [
            ['ordersn', ['not_empty']],
        ];

        return $this;
    }

    public function consume_order()
    {
        $this->rules = [
            ['id', ['not_empty', 'digit', $this->rule_min(1)]],
        ];

        return $this;
    }

    public function express_confirm()
    {
        $this->rules = [
            ['id', ['not_empty', 'digit', $this->rule_min(1)]],
        ];

        return $this;
    }

    public function get_contract_content()
    {
        $this->rules = [
            ['id', ['not_empty', 'digit', $this->rule_min(1)]],
        ];

        return $this;
    }

    public function get_status()
    {
        $this->rules = [
            ['id', ['not_empty', 'digit', $this->rule_min(1)]],
        ];

        return $this;
    }

    public function get_express_progress()
    {
        $this->rules = [
            ['ordersn', ['not_empty']],
        ];

        return $this;
    }
}